#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/7/8 下午6:03
# @Author : admin
# @Software: PyCharm
# @File: base.py


import os
from loguru import logger
from sanic import Sanic


BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
logger.add("log/api/{time:YYYY-MM-DD}.log", format="{time:YYYY-MM-DD at HH:mm:ss}{level}{message}",
           rotation="00:01", encoding='utf-8', enqueue=True)

app = Sanic(__name__)
